3.1.10 \(\int \frac {\sin ^2(a+b \log (c x^n))}{x} \, dx\) [10]

Optimal. Leaf size=39 \[ \frac {\log (x)}{2}-\frac {\cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{2 b n} \]

[Out]

1/2*ln(x)-1/2*cos(a+b*ln(c*x^n))*sin(a+b*ln(c*x^n))/b/n

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2715, 8} \begin {gather*} \frac {\log (x)}{2}-\frac {\sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{2 b n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sin[a + b*Log[c*x^n]]^2/x,x]

[Out]

Log[x]/2 - (Cos[a + b*Log[c*x^n]]*Sin[a + b*Log[c*x^n]])/(2*b*n)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rubi steps

\begin {align*} \int \frac {\sin ^2\left (a+b \log \left (c x^n\right )\right )}{x} \, dx &=\frac {\text {Subst}\left (\int \sin ^2(a+b x) \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=-\frac {\cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{2 b n}+\frac {\text {Subst}\left (\int 1 \, dx,x,\log \left (c x^n\right )\right )}{2 n}\\ &=\frac {\log (x)}{2}-\frac {\cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{2 b n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.09, size = 36, normalized size = 0.92 \begin {gather*} -\frac {-2 \left (a+b \log \left (c x^n\right )\right )+\sin \left (2 \left (a+b \log \left (c x^n\right )\right )\right )}{4 b n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + b*Log[c*x^n]]^2/x,x]

[Out]

-1/4*(-2*(a + b*Log[c*x^n]) + Sin[2*(a + b*Log[c*x^n])])/(b*n)

________________________________________________________________________________________

Maple [A]
time = 0.05, size = 45, normalized size = 1.15

method result size
derivativedivides \(\frac {-\frac {\cos \left (a +b \ln \left (c \,x^{n}\right )\right ) \sin \left (a +b \ln \left (c \,x^{n}\right )\right )}{2}+\frac {b \ln \left (c \,x^{n}\right )}{2}+\frac {a}{2}}{n b}\) \(45\)
default \(\frac {-\frac {\cos \left (a +b \ln \left (c \,x^{n}\right )\right ) \sin \left (a +b \ln \left (c \,x^{n}\right )\right )}{2}+\frac {b \ln \left (c \,x^{n}\right )}{2}+\frac {a}{2}}{n b}\) \(45\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a+b*ln(c*x^n))^2/x,x,method=_RETURNVERBOSE)

[Out]

1/n/b*(-1/2*cos(a+b*ln(c*x^n))*sin(a+b*ln(c*x^n))+1/2*b*ln(c*x^n)+1/2*a)

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 55, normalized size = 1.41 \begin {gather*} \frac {2 \, b n \log \left (x\right ) - \cos \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right ) \sin \left (2 \, b \log \left (c\right )\right ) - \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )}{4 \, b n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*log(c*x^n))^2/x,x, algorithm="maxima")

[Out]

1/4*(2*b*n*log(x) - cos(2*b*log(x^n) + 2*a)*sin(2*b*log(c)) - cos(2*b*log(c))*sin(2*b*log(x^n) + 2*a))/(b*n)

________________________________________________________________________________________

Fricas [A]
time = 2.98, size = 40, normalized size = 1.03 \begin {gather*} \frac {b n \log \left (x\right ) - \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) \sin \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{2 \, b n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*log(c*x^n))^2/x,x, algorithm="fricas")

[Out]

1/2*(b*n*log(x) - cos(b*n*log(x) + b*log(c) + a)*sin(b*n*log(x) + b*log(c) + a))/(b*n)

________________________________________________________________________________________

Sympy [A]
time = 1.86, size = 51, normalized size = 1.31 \begin {gather*} - \frac {\begin {cases} \log {\left (x \right )} \cos {\left (2 a \right )} & \text {for}\: b = 0 \wedge \left (b = 0 \vee n = 0\right ) \\\log {\left (x \right )} \cos {\left (2 a + 2 b \log {\left (c \right )} \right )} & \text {for}\: n = 0 \\\frac {\sin {\left (2 a + 2 b \log {\left (c x^{n} \right )} \right )}}{2 b n} & \text {otherwise} \end {cases}}{2} + \frac {\log {\left (x \right )}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*ln(c*x**n))**2/x,x)

[Out]

-Piecewise((log(x)*cos(2*a), Eq(b, 0) & (Eq(b, 0) | Eq(n, 0))), (log(x)*cos(2*a + 2*b*log(c)), Eq(n, 0)), (sin
(2*a + 2*b*log(c*x**n))/(2*b*n), True))/2 + log(x)/2

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*log(c*x^n))^2/x,x, algorithm="giac")

[Out]

integrate(sin(b*log(c*x^n) + a)^2/x, x)

________________________________________________________________________________________

Mupad [B]
time = 2.40, size = 32, normalized size = 0.82 \begin {gather*} \frac {\ln \left (x^n\right )}{2\,n}-\frac {\sin \left (2\,a+2\,b\,\ln \left (c\,x^n\right )\right )}{4\,b\,n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + b*log(c*x^n))^2/x,x)

[Out]

log(x^n)/(2*n) - sin(2*a + 2*b*log(c*x^n))/(4*b*n)

________________________________________________________________________________________